home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ELECTRON / PCB_DESI / 1540.ZIP / PCBCA110.ZIP / MANUAL < prev    next >
Text File  |  1992-01-13  |  11KB  |  221 lines

  1. BACKGROUND
  2. ----------
  3.  
  4. This is a software package for printed circuit board design. An article I
  5. wrote about it was printed in the September 1989 issue of Dr. Dobb's Journal;
  6. the title is A* Autorouting. A copy of the article as submitted to Dr. Dobb's
  7. is in the file ARTICLE. Also included are various ASCII representations of the
  8. figures. Dr. Dobb's editors decided not to print some of the article and a few
  9. of the figures, but I personally feel that the entire article and all of the
  10. figures are necessary for a full understanding of autorouting. You should
  11. probably read the article in Dr. Dobb's, or the file ARTICLE, before
  12. attempting to do anything with the programs.
  13.  
  14.  
  15. ABOUT THE PROGRAMS
  16. ------------------
  17.  
  18. This is a printed circuit board cad package. It consists of the following
  19. programs: a rat nester, an autorouter, a board viewer, a board printer, a
  20. postscript filter, a file packer (two kinds), and a file unpacker. The
  21. following comment appears in each of the main programs (pcb*.c):
  22.  
  23. ** you may give this software to anyone, make as many copies as you like, and
  24. ** post it on public computer bulletin boards and file servers. you may not
  25. ** sell it or charge any fee for distribution (except for media and postage),
  26. ** remove this comment or the copyright notice from the code, or claim that
  27. ** you wrote this code or anything derived from it. you may modify the code as
  28. ** much as you want (please document clearly with comments, and maintain the
  29. ** coding style), but programs which are derived from this one are subject to
  30. ** the conditions stated here. i am providing this code so that people can
  31. ** learn from it, so if you distribute it, please include source code, not
  32. ** just executables. contact me to report bugs or suggest enhancements; i do
  33. ** not guarantee support, but i will make an effort to help you, and i want to
  34. ** act as a central clearing house for future versions. you should contact me
  35. ** before undertaking a significant development effort, to avoid reinventing
  36. ** the wheel. if you come up with an enhancement you consider particularly
  37. ** useful, i would appreciate being informed so that it can be incorporated in
  38. ** future versions. my address is: Randy Nevin, 1731 211th PL NE, Redmond,
  39. ** WA 98053, USA. this code is available directly from the author; just send a
  40. ** 360k floppy and a self-addressed floppy mailer with sufficient postage.
  41.  
  42. What I intend this to say is that you can do anything you want with these
  43. programs with the following conditions: (1) you can't sell it or anything
  44. derived from it for profit, and (2) you must give me credit. I do not use the
  45. terms 'shareware', 'freeware', or 'public domain' to describe these programs,
  46. since currently accepted definitions for them do not match my intentions.
  47. These programs are absolutely free.
  48.  
  49.  
  50. WHAT THEY DO
  51. ------------
  52.  
  53. The rat nester reads a circuit description, and displays the circuit as a rat
  54. nest, showing the holes and straight lines connecting the specified holes,
  55. without regard to where traces cross. (This program is useful for helping the
  56. designer decide where the components should be located, based on the
  57. connections between them. Minimizing the overall distance of the traces to be
  58. routed can dramatically improve autorouting speed.)
  59.  
  60. The autorouter reads a circuit description, routes the traces, and outputs the
  61. routed printed circuit board to a file. There are two kinds of autorouters:
  62. one-sided and two-sided.
  63.  
  64. The board viewer can read this file and display an image of the board on an
  65. EGA monitor.
  66.  
  67. The board printer can also read this file, and produces board image files of
  68. various resolutions. The board image files can then be sent to an HP laserjet
  69. II laser printer to get hard copy. The board printer can also produce
  70. vector-oriented board image files which are human-readable, and should be
  71. easily translatable into various graphics printer languages, such as
  72. postscript and hpgl.
  73.  
  74. The postscript filter is one such translator, and produces postscript output
  75. from the vector-oriented board image.
  76.  
  77. The file packer and unpacker can be used to save disk space; since board
  78. images usually consist of just a few kinds of bytes, compression rates of 80%
  79. are not uncommon. The file packer and unpacker are intended to compress large
  80. board images, but in fact will work on any file (though the savings are
  81. greatest for files consisting of just a few kinds of often repeated bytes).
  82.  
  83. There are actually two kinds of file packers, but the unpacker can handle
  84. either kind of compression. The first file packer (pcbpak1) uses huffman
  85. encoding down to the bit level, and the second file packer (pcbpak2) uses
  86. run-length encoding at the byte level. I suggest you try each, and use the
  87. one that results in the greatest savings (this will vary according to the
  88. input file).
  89.  
  90. I initially supported the EGA and the HP laserjet II because they are what I
  91. have access to. Shortly after the first release, a user donated the postscript
  92. filter. Other users will want support for different display adapters (VGA,
  93. Hercules) and printers. If you have one of these and are ambitious enough to
  94. enhance the programs to work with it, I hope you'll contact me so your work
  95. can be shared with others.
  96.  
  97.  
  98. COMPILING THE PROGRAMS
  99. ----------------------
  100.  
  101. A makefile is included which compiles and links the programs. It is written
  102. for the Microsoft C 4.0 compiler and Microsoft MASM 4.0 macro assembler, but
  103. should be easily adaptable to whatever compiler/assembler you have. (This is
  104. an example of an enhancement that others would like to share.) The two rules:
  105.     .c.obj:
  106.         cl /Gs /Oat /W3 /Zp /c $*.c
  107.     .asm.obj:
  108.         masm /t /ml $*.asm;
  109. describe compiling and assembling. /Gs allows the compiler to omit
  110. stack-checking code. /Oat is optimization, and is optional. /W3 is a warning
  111. level, and is optional. /Zp causes structures to be packed, and is optional
  112. (omitting it could cause the programs to use more memory). /c keeps the
  113. compiler from initiating a link for each module. /t causes MASM to use terse
  114. mode, and is optional. /ml causes MASM to maintain the case of names (don't
  115. automatically uppercase them), and is required.
  116.  
  117.  
  118. RUNNING THE PROGRAMS
  119. --------------------
  120.  
  121. All the programs except the postscript filter (PCBPSPLT) require command line
  122. arguments, and if you forget what they are, just execute the programs with no
  123. arguments. They will give a usage clause describing what arguments are needed.
  124.  
  125. For PCBRAT.EXE there is one argument: the input (circuit description)
  126. filename. By convention, this is a .PCB file. For PCBROUT1.EXE and
  127. PCBROUT2.EXE (the one-sided and two-sided autorouters) there are two
  128. arguments: the input (circuit description) filename, and the output (board
  129. description) filename. For PCBVIEW.EXE there is one argument: the input (board
  130. description) filename. For PCBPRINT.EXE there is one required argument, the
  131. input (board description) filename, and up to six optional arguments: /P
  132. indicates portrait mode (the circuit board is printed right-side up), /L
  133. indicates landscape mode (the circuit board is printed sideways), /Rn
  134. indicates laser printer resolution (n is 75, 100, 150, or 300 dots per inch),
  135. and /Zm indicates the zoom factor (m is 0, 1, 2, or 3). /H selects HP laserjet
  136. II output; it is the default, and causes the four switches above to be
  137. accepted. /V selects vector-oriented output; if it is given, no other switch
  138. is accepted. Vector-oriented output consists of DIMENSION, LINE, and CIRCLE
  139. statements; read the comments in PCBPRINT.C if you are trying to produce
  140. output for a postscript printer. They explain these statements. Refer to
  141. README.PS for how to use PCBPSPLT.EXE. For PCBPAK*.EXE there are two
  142. arguments: the name of the file to pack, and the name of the output file.
  143. For PCBUNPAK.EXE there are two arguments: the name of the file to unpack, and
  144. the name of the output file.
  145.  
  146.  
  147. INPUT FORMAT
  148. ------------
  149.  
  150. The file called EX1.PCB is an example input file. It defines (a) the
  151. dimensions of the circuit board, which are 29 rows and 37 columns (think of
  152. this as a matrix of cells), (b) a chip type (the 7486, which has 4 XOR gates),
  153. (c) holes where power and ground will be applied, (d) holes where the input
  154. will be applied, (e) the hole where the output will appear, (f) four instances
  155. of the 7486 chip, and (g) the pairs of pins that must be connected to complete
  156. the circuit. For a complete description of the input format, read the large
  157. block comment at the beginning of file IO.C.
  158.  
  159.  
  160. THE FILES
  161. ---------
  162.  
  163. MAKEFILE    -- describes how to compile, assemble, and link the programs
  164. BITMAP1.H    -- bitmaps for various cell types
  165. BITMAP2.H    -- more bitmaps
  166. BITMAP3.H    -- yet more bitmaps
  167. CELL.H        -- cell types and other global constants
  168. ALLOC.C        -- memory allocation routine
  169. BITMAP.C    -- bitmap data structure definitions
  170. BITMAP1.C    -- bitmap data structure definitions (holes only)
  171. BOARD.C        -- routines to initialize the board, and access cells
  172. DIST.C        -- distance calculation routine
  173. IO.C        -- input format processing routines
  174. LINE.C        -- routine to draw lines
  175. PCBPAK1.C    -- main routine for file packer (huffman)
  176. PCBPAK2.C    -- main routine for file packer (run-length)
  177. PCBPRINT.C    -- main routine for board printer
  178. PCBPSPLT.C    -- main routine for postscript filter
  179. PCBRAT.C    -- main routine for rat nester
  180. PCBROUTE.C    -- main routine for autorouter
  181. PCBUNPAK.C    -- main routine for file unpacker
  182. PCBVIEW.C    -- main routine for board viewer
  183. QUEUE.C        -- routines to manipulate the search queue
  184. SOLVE.C        -- main search routine (using the A* algorithm)
  185. WORK.C        -- routines to manipulate the work list
  186. PCBPAK1.EXE    -- compiled version of file packer (first kind)
  187. PCBPAK2.EXE    -- compiled version of file packer (second kind)
  188. PCBPRINT.EXE    -- compiled version of board printer
  189. PCBPSPLT.EXE    -- compiled version of postscript filter
  190. PCBRAT.EXE    -- compiled version of rat's nester
  191. PCBROUT1.EXE    -- compiled version of one-sided autorouter
  192. PCBROUT2.EXE    -- compiled version of two-sided autorouter
  193. PCBUNPAK.EXE    -- compiled version of file unpacker
  194. PCBVIEW.EXE    -- compiled version of board viewer
  195. UTIL.ASM    -- assembly language graphics helpers
  196. ARTICLE        -- text of magazine article printed in Dr. Dobb's Journal,
  197.            September 1989.
  198. FIGURE.*    -- ASCII representations of various figures
  199. ASTAR.C        -- C pseudocode for the A* search algorithm
  200. EX1.PCB        -- the example input file
  201. TTL74*.INC    -- ttl chip definition files. you may want to put all of them
  202.            in a subdirectory called TTL
  203. MANUAL        -- this file
  204. README.PS    -- descrition file for postscript filter
  205.  
  206.  
  207. AUTHOR
  208. ------
  209.  
  210. Randy Nevin, 1731 211th PL NE, Redmond, WA 98053, USA
  211.  
  212.  
  213. PCBPSPLT
  214. --------
  215.  
  216. Dave Schmidt has contributed a filter program to take the vector-oriented
  217. output of pcbprint.exe and translate it into postscript. It is called
  218. PCBPSPLT.EXE (PostScript PLoTter). See README.PS for directions on using it.
  219. The pertinent files are: PCBPSPLT.C, PCBPSPLT.PRO, PCBPSPLT.EPI, and
  220. README.PS.
  221.